Repository navigation
build: run Vite+'s type-aware lint on tsrs's own linter - #754
Conversation
vp lint runs the bin/tsgolint of its own oxlint-tsgolint, so a pnpm override makes that package tools/tsrslint-shim, which runs @maschwenk/tsrslint's binary. A whole-repo vp lint takes 9-10 s and 2 GB at most, against 16 s and 3.6 GB on Vite+'s tsgolint.
|
Review report for head |
Preview deployedURL: https://cloudpid-server-pr-754.ian-g-pascoe.workers.dev Built from eb2a890 (stage This comment updates on each push. |
tsrs 0.21 ships tsgolint's port as tsrs-lint, so the shim loads the tsrs package's linter in place of @maschwenk/tsrslint. A whole-repo vp lint takes 7-8 s and 1 GB at most.
|
Review report for head |
Summary
Stacked on #753. Vite+'s type-aware lint (the part of
vp lint,vp checkandvp stagedthat type-checks) runs on tsrs's own linter,tsrs-lint, instead of Vite+'s bundled tsgolint (ADR-0055 → Consequences). tsrs 0.21 and later ship it: tsgolint's headless protocol and its 61 type-aware rules.package.jsonon purpose. With one, theeffect-tsgo patchstep inpreparemistakes it for Vite+'soxlint-tsgolintand fails the install.tsrshere is the linter only. The typecheck is stilleffect-tsgo tsrs.Evidence
Whole-repo
vp lintwith type-check, two runs each, macOS arm64:tsrs-lint(this PR)typescript(TS2322)andno-floating-promises.vp check,vp run -r typecheck(16/16),prepareandgit-install:check.vp run -r testpassed 16/16. Two runs of the server suite each hit a different timing failure while load average was around 20 from other sessions. Each failing file then passed on its own, and the server suite passed in full once load dropped.Merge Danger
Door: two-way. Removing the override and
tsrsputs back Vite+'s tsgolint.Blast Radius: lint. Ways it can break:
vp lintfails loudly withError running tsgolint. dependencies.md has the check to run on an upgrade.tsgolint.exeor.cmdthere, so the shim doesn't run. macOS and Linux, including CI and the Container, are covered.Plan
vp lintandvp checknow run thetsrspackage'stsrs-lintas the type-aware backend, keeping type-check and the type-aware rules.effect-tsgo --tsrs-lint vp lint(@effect/tsgo0.68 and later), which needs oxlint 1.91 or later, so a Vite+ past 1.4.0. That waits on the Vitest 5.1 workerd issue.